libxenguest: Fix xc_resume() build for non-x86.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 24 Jan 2007 10:18:44 +0000 (10:18 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 24 Jan 2007 10:18:44 +0000 (10:18 +0000)
Signed-off-by: Keir Fraser <keir@xensource.com>
tools/libxc/xc_resume.c

index 519bf1cadb19e6a864e114b58fc2ab46bce27f8b..214d520800d06cd6b400ae018b08df89666d56e0 100644 (file)
@@ -43,13 +43,9 @@ static int xc_domain_resume_cooperative(int xc_handle, uint32_t domid)
 static int xc_domain_resume_any(int xc_handle, uint32_t domid)
 {
     DECLARE_DOMCTL;
+    xc_dominfo_t info;
     int i, rc = -1;
-
-    /*
-     * (x86 only) Rewrite store_mfn and console_mfn back to MFN (from PFN).
-     */
 #if defined(__i386__) || defined(__x86_64__)
-    xc_dominfo_t info;
     unsigned long mfn, max_pfn = 0;
     vcpu_guest_context_t ctxt;
     start_info_t *start_info;
@@ -57,6 +53,7 @@ static int xc_domain_resume_any(int xc_handle, uint32_t domid)
     xen_pfn_t *p2m_frame_list_list = NULL;
     xen_pfn_t *p2m_frame_list = NULL;
     xen_pfn_t *p2m = NULL;
+#endif
 
     if ( xc_domain_getinfo(xc_handle, domid, 1, &info) != 1 )
     {
@@ -64,6 +61,10 @@ static int xc_domain_resume_any(int xc_handle, uint32_t domid)
         goto out;
     }
 
+    /*
+     * (x86 only) Rewrite store_mfn and console_mfn back to MFN (from PFN).
+     */
+#if defined(__i386__) || defined(__x86_64__)
     /* Map the shared info frame */
     shinfo = xc_map_foreign_range(xc_handle, domid, PAGE_SIZE,
                                   PROT_READ, info.shared_info_frame);